package com.wangle.base.agent.cglib;

import com.wangle.base.agent.cglib.code.MyService;
import com.wangle.base.agent.cglib.code.MyServiceInterceptor;
import net.sf.cglib.proxy.Enhancer;

public class Main {
    public static void main(String[] args) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(MyService.class);
        enhancer.setCallback(new MyServiceInterceptor());
        MyService myService = (MyService)enhancer.create();
        myService.hand();
    }
}
